From 40a1982991b1403218bc8276ed5e19ee382166b4 Mon Sep 17 00:00:00 2001 From: robertlipe Date: Sun, 1 Dec 2013 20:23:11 +0000 Subject: [PATCH] Remove extra -I when building on Mac. No reason to search that directory a zillion times when only one file needs mac/libusb/ --- gpsbabel/configure | 3 +-- gpsbabel/configure.in | 3 +-- gpsbabel/jeeps/gpslibusb.cc | 7 ++++++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/gpsbabel/configure b/gpsbabel/configure index b1bc21859..682163f31 100755 --- a/gpsbabel/configure +++ b/gpsbabel/configure @@ -4599,9 +4599,8 @@ rm -f core conftest.err conftest.$ac_objext \ USB_LIBS="-framework IOKit -framework CoreFoundation" $as_echo "#define HAVE_LIBUSB 1" >>confdefs.h - CFLAGS="$CFLAGS -Imac/libusb/" - # On mac use frameworks for includes and library files. + # On Mac, use frameworks for includes and library files. # Macports uses a non-standard build of Qt with an added # QT_INSTALL_FRAMEWORKS flag, so look for thier custom # version first. That will fail on 'normal' Qt so fall diff --git a/gpsbabel/configure.in b/gpsbabel/configure.in index 949a58948..abcb5def0 100644 --- a/gpsbabel/configure.in +++ b/gpsbabel/configure.in @@ -206,9 +206,8 @@ case "$target" in mac/libusb/usb.o " USB_LIBS="-framework IOKit -framework CoreFoundation" AC_DEFINE(HAVE_LIBUSB, 1) - CFLAGS="$CFLAGS -Imac/libusb/" - # On mac use frameworks for includes and library files. + # On Mac, use frameworks for includes and library files. # Macports uses a non-standard build of Qt with an added # QT_INSTALL_FRAMEWORKS flag, so look for thier custom # version first. That will fail on 'normal' Qt so fall diff --git a/gpsbabel/jeeps/gpslibusb.cc b/gpsbabel/jeeps/gpslibusb.cc index 5122ff11c..23b1e7a67 100644 --- a/gpsbabel/jeeps/gpslibusb.cc +++ b/gpsbabel/jeeps/gpslibusb.cc @@ -26,7 +26,12 @@ #include "config.h" #endif #if HAVE_LIBUSB -#include "usb.h" +# if __APPLE__ + // We use our own (slightly modified) libusb. +# include "mac/libusb/usb.h" +# else +# include "usb.h" +# endif #include "gps.h" #include "garminusb.h" #include "gpsusbcommon.h" -- 2.30.2